package com.ylb.rent.util;

import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.temporal.ChronoUnit;
import java.util.Date;

/**
 * @AUTHOR:游李滨
 * @DATE:2023/7/6 10:51
 */
public class DateUtil {

    public static Date plus(LocalDateTime start,int plus, ChronoUnit chronoUnit){


        LocalDateTime plusDateTime = start.plus(plus, chronoUnit);
        long expire =Date.from( plusDateTime.atZone(ZoneId.systemDefault()).toInstant()).getTime();
        return new Date(expire);
    }
}
